import Vue from 'vue';
//引入路由
import router from './router.js';
//引入主组件
import app from './app.vue';
//引入适配方案第三方包
import './lib/flexible/flexible.js';
import './less/base.less';
//引入mui
import './lib/mui/css/mui.min.css';
// import mui from './lib/mui/js/mui.min.js'
// Vue.prototype.mui = mui
// Vue.use(mui)
//引入vue-resource
import VueResource from 'vue-resource';
Vue.use(VueResource);
//引入mint-ui
import { Lazyload } from 'mint-ui';
Vue.use(Lazyload);

import { InfiniteScroll } from 'mint-ui';
Vue.use(InfiniteScroll);

import { Picker } from 'mint-ui';
Vue.component(Picker.name, Picker);
//引入element-ui
import '../node_modules/element-ui/lib/theme-chalk/index.css';
import { Option, Select } from 'element-ui';
Vue.use(Option);
Vue.use(Select);
//配置vue-resourse
Vue.http.options.emulateJSON = true;
Vue.http.options.root = 'http://10.254.7.245:9090/';
//引入mint-ui
import 'mint-ui/lib/style.min.css';
//引入vuex
import Vuex from 'vuex';
Vue.use(Vuex);

var store = new Vuex.Store({
  state: {
    brandTitle: '',
    couponTitle: '',
    categoryTitle: '',
    brandName: ''
  },
  mutations: {
    addBrandTitle(state, name) {
      state.brandTitle = name;
    },
    addCouponTitle(state, name) {
      state.couponTitle = name;
    },
    addCategoryTitle(state, name) {
      state.categoryTitle = name;
    },
    addBrandName(state, name) {
      state.brandName = name;
    }
  }
});
var vm = new Vue({
  el: '#app',
  render: function(c) {
    return c(app);
  },
  router,
  store
});
